
<?php
require_once './database/connection.php';
require_once './database/categories.php';
$obj = new categories();
$data = $obj->laydanhsach();
?>
<div id="sidebar2" class="sidebar">
    <ul>
        <li>
            <h2>Categories</h2>
            <ul>
                <?php foreach ($data as $dulieu) { ?>
                <li><a href="<?php echo "index_2.php?cate=".$dulieu['id'] ?>"><?php echo $dulieu['name']; ?></a></li>
                <?php } ?>
            </ul>
        </li>			
    </ul>
</div>
